<?php

include_once($GLOBALS['cfgPaths']['lib'].'dba/dbaOrder.o.inc.php');

$dbao = new dbaOrder($GLOBALS['udba']);

if ($env->param('action')=='findpassword' && $pwd = $dbao->findPasswordByEmail($env->param('email')))
{
    mail($env->param('email'), $GLOBALS['cfgXICSShop']['retrieval_subject'], 'Das von Ihnen angeforderte ' .
            'Passwort lautet: '.$pwd);
    print "Ihr Passwort wurde per an die eMail gesendet!";
}
else
{
    print '<form action="?">' .
            '<input name="doc_id" type="hidden" value="'.$env->param('doc_id').'"/>' .
            '<input name="action" type="hidden" value="findpassword"/>' .
            'eMail: <input name="email" type="text" size="24"/><br/>' .
            '<input type="submit" value="Senden..."/>' .
          '</form>';
}
?>
